package com.bluejie.bluej.java.base.generics;

public class ContainerDemo {
    private String name= "what";
    public static void main(String[] args) {
        BluejContainer<String,Integer> c1 = new BluejContainer<String,Integer>("1",1);
        BluejContainer<String,String> c2 = new BluejContainer<String,String>("abc","abc");
        BluejContainer<String,ContainerDemo> c3 = new BluejContainer<String,ContainerDemo>("container",new ContainerDemo());

        System.out.println(c1.getV());
        System.out.println(c2.getV());

        System.out.println(c3.getV().getName());


        ContainerDemo containerDemo = c3.getGenerator(new ContainerDemo());
        System.out.println(containerDemo.getName());


    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
